package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.core.shiro.ShiroKit;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

/**
 * <p>
 *
 * </p>
 *
 * @author LiuXin
 * @since 2018-09-19
 */
@TableName("jxc_goods_overflow_list")
public class GoodsOverflowList extends Model<GoodsOverflowList> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 商品编码
     */
    @TableField("goods_code")
    private String goodsCode;
    /**
     * 商品型号
     */
    @TableField("goods_model")
    private String goodsModel;
    /**
     * 商品名称
     */
    @TableField("goods_name")
    private String goodsName;
    /**
     * 报损数量
     */
    @TableField("goods_number")
    private Integer goodsNumber;
    /**
     * 报损价格
     */
    @TableField("goods_price")
    private BigDecimal goodsPrice;
    /**
     * 商品计量单位
     */
    @TableField("goods_unit")
    private String goodsUnit;

    @TableField("total_price")
    private String totalPrice;

    /**
     * 创建者
     */
    @TableField("create_by")
    private String createBy = Objects.requireNonNull(ShiroKit.getUser()).getAccount();
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新者
     */
    @TableField("update_by")
    private String updateBy = Objects.requireNonNull(ShiroKit.getUser()).getAccount();
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate = new Date();
    /**
     * 备注信息
     */
    private String remarks;
    /**
     * 删除标记（0：正常；1：删除）
     */
    @TableField("del_flag")
    private String delFlag;
    /**
     * 主键
     */
    @TableField("goods_overflow_id")
    private Long goodsOverflowId;
    /**
     * 商品id
     */
    @TableField("goods_id")
    private Long goodsId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodsModel() {
        return goodsModel;
    }

    public void setGoodsModel(String goodsModel) {
        this.goodsModel = goodsModel;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getGoodsNumber() {
        return goodsNumber;
    }

    public void setGoodsNumber(Integer goodsNumber) {
        this.goodsNumber = goodsNumber;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getGoodsUnit() {
        return goodsUnit;
    }

    public void setGoodsUnit(String goodsUnit) {
        this.goodsUnit = goodsUnit;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public Long getGoodsOverflowId() {
        return goodsOverflowId;
    }

    public void setGoodsOverflowId(Long goodsOverflowId) {
        this.goodsOverflowId = goodsOverflowId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GoodsOverflowList{" +
                "id=" + id +
                ", goodsCode=" + goodsCode +
                ", goodsModel=" + goodsModel +
                ", goodsName=" + goodsName +
                ", goodsNumber=" + goodsNumber +
                ", goodsPrice=" + goodsPrice +
                ", goodsUnit=" + goodsUnit +
                ", totalPrice=" + totalPrice +
                ", createBy=" + createBy +
                ", createDate=" + createDate +
                ", updateBy=" + updateBy +
                ", updateDate=" + updateDate +
                ", remarks=" + remarks +
                ", delFlag=" + delFlag +
                ", goodsOverflowId=" + goodsOverflowId +
                ", goodsId=" + goodsId +
                "}";
    }
}
